package com.lh.java.basic.datatype;

public class ArrayApp {
	public static void main(String[] args) {
		long [] arry;
		arry = new long[100];
		int nElems = 0;
		int j;
		long searchKey;
		
		arry[0] = 77;
		arry[1] = 99;
		arry[2] = 44;
		arry[3] = 55;
		arry[4] = 22;
		arry[5] = 88;
		arry[6] = 11;
		arry[7] = 00;
		arry[8] = 66;
		arry[9] = 33;
		nElems = 10;
		
		for(j=0;j<nElems;j++){
			System.out.print(arry[j]+" ");
		}
		System.out.println();
		
		searchKey  = 86;
		for(j=0;j<nElems;j++){
			if(searchKey==arry[j]){
				break;
			}			
		}
		
		if(j==nElems){
			System.out.println("can not find "+searchKey+".");
		}else {
			System.out.println("find "+searchKey+".");
		}
		
	}

}
